Skip to content

[BREAKING] MAINT Remove v1 deprecated compatibility paths#2195

Merged
romanlutz merged 7 commits into
microsoft:mainfrom
romanlutz:romanlutz-repository-cleanup-audit
Jul 16, 2026
Merged

[BREAKING] MAINT Remove v1 deprecated compatibility paths#2195
romanlutz merged 7 commits into
microsoft:mainfrom
romanlutz:romanlutz-repository-cleanup-audit

Conversation

@romanlutz

Copy link
Copy Markdown
Contributor

Description

PyRIT 1.0 should not retain compatibility APIs and persistence columns whose removal is already due. This breaking maintenance change removes those surfaces while keeping configuration, memory migrations, integrations, and published documentation aligned with the v1 contract.

  • Removes Psychosocial(objectives=...), OpenAIChatTarget(max_tokens=...), and legacy CLI/default-config scenario: support. Legacy scenario blocks now fail explicitly instead of being silently ignored.
  • Removes ScoreEntries.task and ScenarioResultEntries.attack_results_json through reversible migration 24b44ef076b6. Downgrades restore task from objective and reconstruct scenario manifests from attack attribution data.
  • Moves ANSI and Garak catalogs onto their owning classes, modernizes requested type annotations, and removes stale compatibility wording.
  • Updates tests, examples, memory documentation, and rendered notebook outputs. Active contracts such as system_prompt_path and MessagePiece.labels remain supported after verification; Hugging Face endpoints continue to send their endpoint-specific max_tokens wire field via extra_body_parameters.

Tests and Documentation

  • 10,612 unit tests passed; 6 skipped.
  • 101 focused OpenAI/Hugging Face target tests passed; 6 skipped.
  • All pre-commit hooks passed, including Ruff, ty, documentation validation, async naming, notebook checks, and memory migration checks.
  • Migration upgrade/downgrade coverage passed, including data preservation and manifest reconstruction.
  • Changed Jupytext notebook pairs were regenerated and compared for logical source parity; rendered outputs were updated for the v1 schema and Psychosocial scenario version.

Remove obsolete public compatibility APIs, migrate superseded memory columns, and align docs, tests, typing, and owned constants with the v1 contract.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: d3667fe5-fb0c-4010-8308-29c6efb42ea8
Comment thread pyrit/memory/memory_models.py Outdated
Behnam Ousat and others added 6 commits July 15, 2026 15:29
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: d3667fe5-fb0c-4010-8308-29c6efb42ea8
@romanlutz
romanlutz added this pull request to the merge queue Jul 16, 2026
Merged via the queue into microsoft:main with commit acc2a77 Jul 16, 2026
53 checks passed
@romanlutz
romanlutz deleted the romanlutz-repository-cleanup-audit branch July 16, 2026 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants